using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using ComponentFactory.Krypton.Toolkit;
using Microsoft.Reporting.WinForms;

namespace OrionBanque.Rapport
{
    public partial class RRib : ComponentFactory.Krypton.Toolkit.KryptonForm
    {
        private Int32 IdCompteA;

        public RRib(Int32 IdCompteP)
        {
            IdCompteA = IdCompteP;
            InitializeComponent();
        }

        private void RRib_Load(object sender, EventArgs e)
        {
            Classe.Compte c = Classe.Compte.Charge(IdCompteA);

            var Comptes = new List<OrionBanque.Classe.Compte>
                            {
                                c
                            }.ToArray();

            this.reportViewer1.LocalReport.DataSources.Add(
                new ReportDataSource("RibCompte", Comptes));

            this.reportViewer1.RefreshReport();
        }
    }
}